# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=pypng
pkgname=python-$_pkgname
pkgver=0.0.21
pkgrel=4
pkgdesc='Pure Python library for PNG image encoding/decoding'
arch=('any')
url='https://github.com/drj11/pypng'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_pkgname-$pkgver.tar.gz")
sha512sums=('b8f5f9be05aafe59aeb69462b7ccc9e5c4df8eb157731d888773f0ef223dc1c45db83daa51347b45dc3c59be5141c3fc4e031004ac28927b786d7e254ffff4fa')

prepare() {
  cd $_pkgname-$_pkgname-$pkgver

  echo -e 'import setuptools\nsetuptools.setup()' >setup.py
}

build() {
  cd $_pkgname-$_pkgname-$pkgver

  python setup.py build
}

package() {
  cd $_pkgname-$_pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENCE "$pkgdir"/usr/share/licenses/$pkgname/LICENCE
}

# vim:set ts=2 sw=2 et:
